package com.kingyun.gpsinspection.purificationservice.facade.service.som;

import com.kingyun.gpsinspection.purificationservice.facade.model.File;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * Created by yangcs on 2017/1/19.
 */
public interface SomFileService {

    /**
     * 上传图片
     * @param request
     * @param fileName
     * @return
     */
    String[] uploadimg(HttpServletRequest request, String fileName) throws Exception;

    /**
     * 根据业务id和类型查询图片路径
     * @param businessId
     * @param type
     * @return
     */
    List<String> findByBusinessId(String businessId, int type);

    /**
     * 根据业务id查询图片路径
     * @param businessId
     * @return
     */
    List<String> findByBusinessId(String businessId);

    /**
     * 根据业务id和类型查询图片
     * @param businessId
     * @param type
     * @return
     */
    List<File> findByBusiness(String businessId, int type);

    /**
     * 根据业务id查询图片
     * @param businessId
     * @return
     */
    List<File> findByBusiness(String businessId);

    /**
     * 根据ID查询附件
     * @param fileId
     * @return
     * @throws Exception
     */
    File queryById(String fileId) throws Exception;

    /**
     * 根据HbasePath删除
     * @param fileHbasePath
     * @return
     * @throws Exception
     */
    int delByFileHbasePath(String fileHbasePath) throws Exception;

    /**
     * 插入信息
     * @param file
     * @return
     */
    int insert(File file);
}
